﻿using AutoMapper;
using B.S.BasicData.Api.Write.Application.Command.Approval;
using B.S.BasicData.Api.Write.Application.Command.Menu;
using B.S.BasicData.Api.Write.Application.Command.Role;
using B.S.BasicData.Api.Write.Application.Command.User;
using B.S.BasicData.Domain;

namespace B.S.BasicData.Api.Write
{
    public class MyMapper:Profile
    {
        public MyMapper() 
        {
            CreateMap<UserModel, AddUserCommand>().ReverseMap();
            CreateMap<UserModel,DelUserCommand>().ReverseMap();
            CreateMap<UserModel, UpdateUserCommand>().ReverseMap();

            CreateMap<RoleModel,AddRoleCommand>().ReverseMap();
            CreateMap<RoleModel, UpdateRoleCommand>().ReverseMap();
            CreateMap<RoleModel,DelRoleCommand>().ReverseMap();
            CreateMap<MenuModel,AddMenuCommand>().ReverseMap();
            CreateMap<MenuModel, UpdateMenuCommand>().ReverseMap();
            CreateMap<ApprovalModel, AddApprovalCommand>().ReverseMap();
            CreateMap<ApprovalModel,DelApprovalCommand>().ReverseMap();
            CreateMap<ApprovalModel,UpdateApprovalCommand>().ReverseMap();
        }
    }
}
